package exsun.jt808.data.jt809_data.vehicledynamic.main;

import com.alibaba.fastjson.JSONObject;
import com.google.common.primitives.Bytes;
import exsun.jt808.data.jt809_data.BasicVehicleInfo;
import exsun.jt808.data.jt809_data.SendBaseEntity;
import lombok.Data;

import java.util.Date;

/**
 * 主动上传终端安装信息消息
 */
@Data
public class UpExgMsgSafetyTerminal extends SendBaseEntity {

    //车辆基本信息
    public BasicVehicleInfo basicVehicleInfo;

    //车辆所属运营商平台唯一编码（部平台过检编号)
    public String platform_id;

    //设备厂商名称
    public String producer;

    //设备型号，不足 30 位时以“\0”终结
    public String terminal_model;

    //设备编号
    public String terminal_id;

    //安装时间，用 UTC 时间表示
    public Date install_time;

    //安装单位
    public String install_company;

    //联系人
    public String contacts;

    //联系电话
    public String telephone;

    //是否符合要求，0：否，1：是
    public int compliance_requirements;

    public JSONObject toJSONString() {
        JSONObject object = new JSONObject();
        object.put("basicVehicleInfo", basicVehicleInfo);
        object.put("platform_id", platform_id);
        object.put("producer", producer);
        object.put("terminal_model", terminal_model);
        object.put("terminal_id", terminal_id);
        object.put("install_time", install_time);
        object.put("install_company", install_company);
        object.put("contacts", contacts);
        object.put("telephone", telephone);
        return object;
    }




}
